import Vue from 'vue'
import VueRouter from 'vue-router'
// import bulletinBoard from './bulletinBoard'
// import productOperateManagement from './productOperateManagement'
import householdWaste from './householdWaste'
import greenSeasons from './greenSeasons'
import worm from './worm'
import notice from './notice'
// import statistics from './statistics'
import Layout from '@/views/layout'
import craftScene from './craftScene'
import productionScene from './productionScene'
// import request from '../network/request'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/login',
    hidden: true
  },
  {
    path: '/login',
    name: '欢迎使用垃圾分类处理管理系统',
    component: () => import('@/views/login'),
    meta: { active: false },
    hidden: true
  },
  householdWaste,
  greenSeasons,
  worm,
  // statistics,
  // productOperateManagement,
  // bulletinBoard,
  {
    path: '/userManagement',
    redirect: '/userManagement/home',
    name: '用户管理',
    component: Layout,
    meta: { active: false, isFold: true, permission: false, superAdmin: false },
    children: [
      {
        path: 'home',
        name: '用户管理首页',
        component: () => import('@/views/userManagement'),
        meta: { active: false }
      }
    ]
  },
  craftScene,
  productionScene,
  notice,
  {
    path: '/factory',
    redirect: '/factory/home',
    name: '场站管理',
    component: Layout,
    meta: { active: false, isFold: true, permission: false, superAdmin: true },
    children: [
      {
        path: 'home',
        name: '场站管理首页',
        component: () => import('@/views/factoryManagement'),
        meta: { active: false }
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router

export { routes }
